<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="/WEB-INF/tld/fns.tld" prefix="fns" %>
<!DOCTYPE HTML>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <jsp:include page="/resources/inc/head.jsp" />
    <link href="${basePath}/resources/zheng-admin/plugins/zTree_v3/css/demo.css" rel="stylesheet"/>
    <link href="${basePath}/resources/zheng-admin/plugins/zTree_v3/css/metroStyle/metroStyle.css" rel="stylesheet"/>
</head>
<body>

<form class="layui-form layui-form-pane" id="_form">
    <div class="layui-form-item">
        <label class="layui-form-label">法定假期名称</label>
        <div class="layui-input-block">
            <input type="text" name="festivalName" lay-verify="required" autocomplete="off" placeholder="请输入法定假期名称"
                   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">法定假期开始时间</label>
        <div class="layui-input-block">
            <input type="text" name="festivalDate" autocomplete="off"
                   placeholder="请选择法定假期开始时间"
                   class="layui-input date-select" readonly="readonly">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">法定假期持续时间</label>
        <div class="layui-input-block">
            <input type="text" name="festivalDay" lay-verify="required" autocomplete="off" placeholder="请输入法定假期持续时间"
                   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block" style="float: right">
            <button class="layui-btn" lay-submit="" lay-filter="sub">立即提交</button>
        </div>
    </div>
</form>
<jsp:include page="/resources/inc/pageFooter.jsp" />
<script>
    $(function () {
        layui.use('laydate', function () {
            laydate = layui.laydate;
            $(".date-select").each(function (index, input) {
                laydate.render({
                    elem: this //指定元素
                    , theme: '#393D49'
                    , type: 'date'
                });
            });
        });
        FormCommon.initForm({
            url: '${basePath}/oa/hr/festival/create',
            subContentType: "json",
            editData: function (data) {
                data.beginTime = new Date(data.beginTime);
                return data;
            }
        });
    });
</script>
</body>
</html>
